package com.kate.mall.oauth.feign;

import com.kate.mall.common.utils.R;
import com.kate.mall.oauth.dto.MemberDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description: 用一句话描述
 * @Auther: 新梦想*陈超
 * @Date: 2021/8/24 16:45
 */
@FeignClient(value = "member-center")
public interface MemeberFeignClient {
    @GetMapping("user/member/list")
    R getUserInfoByOpenId(@RequestParam("open_id") String openId);

    @GetMapping("user/member/save")
    R add(@RequestBody  MemberDto memberDto);

    @PutMapping(value = "user/member/update",consumes = "application/json")
    R update(@RequestBody  MemberDto weixinOpenid);

    @GetMapping("user/sysoauthclient/list")
    R getClientDetail(@RequestParam("client_id") String clientId);

    @GetMapping("user/member/list")
    R getUserInfoByName(@RequestParam("username") String username);
}
